feat(mac-crafter): Add entitlements path option to codesign command
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 29 Apr 2025 04:52:13 +0000 (12:52 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 4 Jun 2025 08:09:58 +0000 (08:09 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
admin/osx/mac-crafter/Sources/main.swift

index f659c82c541422b23fbfb7189d2c84b042d5c7ca..adcbd77d15f31cb7ec4db4911fabf20039b3baa7 100644 (file)
@@ -286,11 +286,19 @@ struct Codesign: ParsableCommand {
     @Option(name: [.short, .long], help: "Code signing identity for desktop client and libs.")
     var codeSignIdentity: String
 
+    @Option(name: [.short, .long], help: "Entitlements to apply to the app bundle.")
+    var entitlementsPath: String?
+
     mutating func run() throws {
         let absolutePath = appBundlePath.hasPrefix("/")
             ? appBundlePath
             : "\(FileManager.default.currentDirectoryPath)/\(appBundlePath)"
-        try codesignClientAppBundle(at: absolutePath, withCodeSignIdentity: codeSignIdentity)
+
+        try codesignClientAppBundle(
+            at: absolutePath,
+            withCodeSignIdentity: codeSignIdentity,
+            usingEntitlements: entitlementsPath
+        )
     }
 }